﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="Default.aspx.cs" Inherits="_Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSourceNews">
        <ItemTemplate>
            <h2>
                <a href="#">
                    <asp:Label ID="LblTitle" runat="server" Text='<%# Eval("newsTitle") %>'></asp:Label></a></h2>
            <asp:Label ID="LblContent" runat="server" Text='<%# Eval("newsContent") %>'></asp:Label></p><p
                class="date">
                <img src="images/more.gif" alt="" />
                <asp:Label ID="LblAuhtor" runat="server" Text='<%# Eval("c_Name") %>'></asp:Label>
                <img src="images/timeicon.gif" alt="" />
                <asp:Label ID="Label2" runat="server" Text='<%# Eval("newsTime") %>'></asp:Label></p>
            <p>
        </ItemTemplate>
    </asp:Repeater>
    <asp:SqlDataSource ID="SqlDataSourceNews" runat="server" ConnectionString="<%$ ConnectionStrings:qynbControlSystemConnectionString %>"
        
    SelectCommand="SELECT top 3 news.newsID, news.newsTitle, news.newsContent, news.newsAuthor, news.newsClass, news.newsRemark, news.newsTime, cusInfo.c_Name FROM news INNER JOIN cusInfo ON news.newsAuthor = cusInfo.cusID WHERE (news.newsClass = @newsClass)">
        <SelectParameters>
            <asp:Parameter DefaultValue="31" Name="newsClass" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
</asp:Content>
